#!/bin/sh 
#Example script: View the permissions of a file
# End If Software 2003
#$$NoBeep
#$$ + UseTextoutPut: The result will be displayed in a text window
#$$ + noBeep: The result will be displayed without beep
#$$ + useAuth: The script will always be executed with root authorisation (you can always use the option-key to execute with root)

#variable 1 is the argument from the caller: the file path
#if you don't use our authorisation for your script, you can symly return your err variable
#but if you use the our authorisation, you need to pipe the error to a file and return the file
#content


#use with our authorisation: you need to pipe the err to a file
myerr=$(ls -l "$1" >& ~/Library/Preferences/End\ If\ Preferences/ShellErr )
cat ~/Library/Preferences/End\ If\ Preferences/ShellErr



#use this if you don't need authorisation
#myerr=$(chmod 777 "$1" )
#echo $myerr

#or more simple:
#echo | chmod 777 "$1"